import { sleep } from "antd-mobile/es/utils/sleep";
import { httpJson } from "../services/http";

// 图片上传
export async function mockUpload(file: File) {
    await sleep(2000);
    let formData = new FormData();
    formData.append("file", file);
    const res:any = await httpJson('POST', '/api/uploadFile', formData);
    console.log("res.data.message===>", res.data.message);
    return {
        url:`http://121.43.147.142:8080/${res.data.message}`
    }
}
